Skip to content

feat(ci): switch to uv publish for PyPI uploads#13991

Merged
alex merged 6 commits intopyca:mainfrom
woodruffw-forks:ww/uv-publish
Apr 25, 2026
Merged

feat(ci): switch to uv publish for PyPI uploads#13991
alex merged 6 commits intopyca:mainfrom
woodruffw-forks:ww/uv-publish

Conversation

@woodruffw
Copy link
Copy Markdown
Member

@woodruffw woodruffw commented Dec 10, 2025

This switches pypi-publish.yml from gh-action-pypi-publish to uv publish. The upload itself is still through Trusted Publishing, and attestations are preserved through astral-sh/attest-action (which can be removed in the medium-term, once uv publish itself supports attestation generation).

Noting a few things from conversation with @reaperhulk:

- This runs uv publish directly, since the uv binary is configured on the $PATH implicitly via astral-sh/attest-action. This is arguably undesirable, since cryptography otherwise pins uv via a requirements file.
- Separately, this currently runs the latest uv release at all times, since astral-sh/attest-action doesn't attempt to pin it (besides a lower bound for compatibility). This is "ok" from Astral's own trust domain, but it might not be what you want in your release pathway for stability/reproducibility purposes.

Both of the above have been addressed: this now uses only the version of uv that the rest of the CI is constrained against.

TL;DR: This all works, but the current approach may not be what you want in terms of version pinning.

@woodruffw
Copy link
Copy Markdown
Member Author

(My plan here is to make attest-action hard-pin the uv version, and then release a new version that I'll bump to in this PR.)

Comment thread .github/workflows/pypi-publish.yml
Comment thread .github/workflows/pypi-publish.yml Outdated
@woodruffw woodruffw marked this pull request as draft April 24, 2026 14:17
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw woodruffw marked this pull request as ready for review April 24, 2026 21:52
Comment thread .github/workflows/pypi-publish.yml Outdated
Comment on lines +50 to +51
cache: pip
cache-dependency-path: ci-constraints-requirements.txt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no cache please, for things in the release path we don't want any caching bug or cache contamination risks

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm actually surprised zizmor didn't flag this. I'll look into that separately too.

Comment thread .github/workflows/pypi-publish.yml Outdated

- run: python -m pip install -c ci-constraints-requirements.txt 'uv'

- uses: dawidd6/action-download-artifact@5c98f0b039f36ef966fdb7dfa9779262785ecb05 # v14
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version change which is incidental, I assume

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, just from me merging the wrong side of the conflict. I'll re-bump back to v20.

Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
@alex alex enabled auto-merge (squash) April 25, 2026 22:49
@alex alex merged commit b26f75f into pyca:main Apr 25, 2026
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants